using KTWpm.Management.Api.Application;
using Microsoft.AspNetCore.Mvc;

namespace KTWpm.Management.Api.Controllers
{
    [ApiController]
    [Route("[controller]")]
    public class ManagementController(ManagementApplicationService applicationService, ICommandHandle<SetWeightCommand> commandHandle) : ControllerBase
    {
        [HttpPost]
        public async Task<IActionResult> Post(CreatePetCommand command)
        {
            await applicationService.Handle(command);
            return Ok("Pet created successfully.");
        }


        [HttpPut]
        public async Task<ActionResult> Put(SetWeightCommand command)
        {
            await commandHandle.Handle(command);
            return Ok("Weight updated successfully.");
        }
    }





}
